package net.da.core.entity;

import java.util.Collection;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="organisation_units")
public class OrganisationUnitEntity extends BusinessObjectEntity {

    @Column(name="name", nullable=false)
    private String name;

    private String address;

    @OneToMany(mappedBy="organisationUnit")
    private Collection<OrganisationUserEntity> organisationUsers;

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Collection<OrganisationUserEntity> getOrganisationUsers() {
        return organisationUsers;
    }

    public void setOrganisationUsers(Collection<OrganisationUserEntity> organisationUsers) {
        this.organisationUsers = organisationUsers;
    }

}
